<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>
<body>
    <template id="mybtn1">
        <button style="width: 100px; height: 30px; background-color: green;">
            自定按钮 1
        </button>
    </template>

    <template id="mybtn2">
        <button style="width: 100px; height: 30px; background-color: red;">
            自定按钮 2
        </button>
    </template>

    <div id="app1">
        <my-btn1></my-btn1>
    </div>

    <div id="app2">
        <my-btn2></my-btn2>
    </div>
</body>
<script>
    let app1 = new Vue({
    el: '#app1',
    components: {
            'my-btn1': {
                template: '#mybtn1'
            }
        }
    })

    let app2 = new Vue({
        el: '#app2',
        components: {
            'my-btn2': {
                template: '#mybtn2'
            }
        }
    })


</script>
</html>
